Skip to content

feat: Marten WritableStore backend + .NET 9/10 retarget (v6.0.0)#52

Merged
windischb merged 4 commits into
developfrom
feature/marten-backend-net10
Jun 1, 2026
Merged

feat: Marten WritableStore backend + .NET 9/10 retarget (v6.0.0)#52
windischb merged 4 commits into
developfrom
feature/marten-backend-net10

Conversation

@windischb

Copy link
Copy Markdown
Contributor

Targets v6.0.0 (major — +semver: major on the feat commit). Rebased on top of the LF normalization (#51), so the diff is clean.

Highlights

Marten WritableStore backend (new opt-in package)

Cocoar.Configuration.WritableStore.Marten — persists writable configuration overrides in Marten (PostgreSQL).

  • MartenStoreBackend : IStoreBackend, one CocoarConfigDocument per config type.
  • FromMartenStore() service-backed (Layer-2) rule resolves IDocumentStore from DI; combine with .TenantScoped() for database-per-tenant config (each tenant's overlay in its own database). Works single-tenant too (drop .TenantScoped()).
  • Self-skipping Testcontainers integration tests (round-trip, missing key, per-tenant DB isolation).

Retarget to .NET 9 / .NET 10 (BREAKING)

  • TargetFrameworksnet9.0;net10.0 (net8 dropped). global.json → .NET 10 SDK. Test projects → net10.0. CI setup-dotnet → 9.0.x + 10.0.x.
  • Microsoft.Extensions.* → 10.0.x (native net9 target, no runtime hit for net9 consumers), Marten 9.3.4.

Removed APIs deprecated since v5 (BREAKING)

  • IConfigurationAccessor.GetRequiredConfig<T>()/(Type)GetConfig<T>()/(Type)
  • FromMicrosoftSource()FromIConfiguration()
  • X509CertificateGenerator.GenerateAndSave()GenerateAndSavePfx/Pem

Misc

  • Probe tests pinning the (verified, kept) case-insensitive layer-merge behavior.
  • Docs: new Marten Store guide page, packages.md, changelog.

Verification

  • Full solution builds on net9.0 + net10.0.
  • 741 tests green on net10.0 (incl. 3 real Marten integration tests against PostgreSQL); dotnet pack and vitepress build verified locally.

Merge #51 (line-ending normalization) first if not already — this branch is rebased on it.

🤖 Generated with Claude Code

windischb and others added 4 commits June 1, 2026 13:42
Add Cocoar.Configuration.Marten — a tenant-aware (database-per-tenant) Marten/PostgreSQL IStoreBackend for the WritableStore. FromMartenStore() (service-backed, Layer-2) resolves IDocumentStore from DI and routes by accessor.Tenant; combine with .TenantScoped() so each tenant's overlay lives in its own database. Includes self-skipping Testcontainers integration tests.

Retarget the library to net9.0;net10.0 (drop net8.0), aligned with .NET 10: Microsoft.Extensions.* and ProtectedData -> 10.0.8, Marten 9.3.4, test projects -> net10.0, global.json -> .NET 10 SDK, and CI setup-dotnet -> 9.0.x + 10.0.x.

BREAKING CHANGE: drops .NET 8 support; consumers must target .NET 9 or later.

+semver: major

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A major release is the window to drop APIs deprecated since v5: IConfigurationAccessor.GetRequiredConfig<T>()/(Type) -> GetConfig<T>()/(Type); FromMicrosoftSource() -> FromIConfiguration(); X509CertificateGenerator.GenerateAndSave() -> GenerateAndSavePfx/Pem. All call sites (tests, examples, current docs) migrated.

Adds probe tests pinning the case-insensitive layer-merge behavior (verified, kept as-is). Also removed stale local build-output dirs from the working copy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
It is specifically the Marten WritableStore backend, not a general 'all things Marten' package — the explicit name signals that concern (vs the ambiguous Cocoar.Configuration.Marten). Renames the project, test project, namespaces, solution entries, and all doc/changelog references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PostgreSqlBuilder.Build() validates Docker availability and throws DockerUnavailableException. It ran in the fixture's field initializer (outside the try), so on Docker-less runners (GitHub macOS) class-fixture init failed instead of skipping. Build the container inside InitializeAsync's try so the throw is caught -> Available=false -> tests skip cleanly. (Windows already skipped: its Docker endpoint exists so Build() passed and StartAsync failed inside the try.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@windischb windischb merged commit 6d4467e into develop Jun 1, 2026
4 checks passed
@windischb windischb deleted the feature/marten-backend-net10 branch June 1, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant